using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._StandardFeatureAnalysisTools._AnalyzePatterns
{
    /// <summary>
    /// <para>Find Hot Spots</para>
    /// <para>Identifies statistically significant spatial clustering of high values (hot spots) or low values (cold spots), or data counts,  in your data. Use this tool to uncover hot  and cold spots of high and low home values, crime densities, traffic accident fatalities, unemployment or biodiversity, for example.</para>
    /// <para>识别数据中高值（热点）或低值（冷点）或数据计数的具有统计显著性的空间聚类。例如，使用此工具可以发现高低房价、犯罪密度、交通事故死亡人数、失业或生物多样性的热点和冷点。</para>
    /// </summary>    
    [DisplayName("Find Hot Spots")]
    public class FindHotSpots : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public FindHotSpots()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_analysisLayer">
        /// <para>Input Features</para>
        /// <para>The point or polygon feature layer for which hot spots will be calculated.</para>
        /// <para>将为其计算热点的点或面要素图层。</para>
        /// </param>
        /// <param name="_outputName">
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// </param>
        public FindHotSpots(object _analysisLayer, object _outputName)
        {
            this._analysisLayer = _analysisLayer;
            this._outputName = _outputName;
        }
        public override string ToolboxName => "Standard Feature Analysis Tools";

        public override string ToolName => "Find Hot Spots";

        public override string CallName => "sfa.FindHotSpots";

        public override List<string> AcceptEnvironments => ["extent"];

        public override object[] ParameterInfo => [_analysisLayer, _outputName, _analysisField, _divideByField, _boundingPolygonLayer, _aggregatePolygonLayer, _outputLayer];

        /// <summary>
        /// <para>Input Features</para>
        /// <para>The point or polygon feature layer for which hot spots will be calculated.</para>
        /// <para>将为其计算热点的点或面要素图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _analysisLayer { get; set; }


        /// <summary>
        /// <para>Output Name</para>
        /// <para>The name of the output layer to create on your portal.</para>
        /// <para>要在门户上创建的输出图层的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _outputName { get; set; }


        /// <summary>
        /// <para>Analysis Field</para>
        /// <para><xdoc>
        ///   <para>A numeric field (number of incidents, crime rates, test scores, and so on) to be evaluated. The field you select might represent the following:
        ///   <bulletList>
        ///     <bullet_item>Counts (such as the number of traffic accidents)  </bullet_item><para/>
        ///     <bullet_item>Rates (such as the number of crimes per square mile)  </bullet_item><para/>
        ///     <bullet_item>Averages (such as the mean math test score)  </bullet_item><para/>
        ///     <bullet_item>Indices (such as a customer satisfaction score)  </bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para><xdoc>
        /// <para>要评估的数值字段（事件数、犯罪率、考试成绩等）。您选择的字段可能表示以下内容：
        ///   <bulletList>
        ///     <bullet_item>计数（例如交通事故数量）</bullet_item><para/>
        ///     <bullet_item>比率（例如每平方英里的犯罪数量）</bullet_item><para/>
        ///     <bullet_item>平均值（例如平均数学考试成绩）</bullet_item><para/>
        ///     <bullet_item>指数（例如客户满意度分数）</bullet_item><para/>
        ///   </bulletList>
        ///   </para>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Analysis Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _analysisField { get; set; } = null;


        /// <summary>
        /// <para>Divide By Field</para>
        /// <para>The numeric field in the input layer that will be used to normalize your data. For example, if your points represent crimes, dividing by total population would result in an analysis of crimes per capita rather than raw crime counts.</para>
        /// <para>输入图层中将用于规范化数据的数值字段。例如，如果您的点代表犯罪，则除以总人口将导致对人均犯罪的分析，而不是原始犯罪计数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Divide By Field")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _divideByField { get; set; } = null;


        /// <summary>
        /// <para>Bounding Polygons</para>
        /// <para>When the analysis layer is points and no analysis field is specified, you can provide polygon features that define where incidents could have occurred. For example, if you are analyzing boating accidents in a harbor, the outline of the harbor might provide a good boundary for where accidents could occur. When no bounding areas are provided, only locations with at least one point will be included in the analysis.</para>
        /// <para>如果分析图层为点且未指定分析字段，则可以提供用于定义事件可能发生位置的面要素。例如，如果要分析港口中的划船事故，则港口的轮廓可能会为可能发生事故的位置提供良好的边界。如果未提供边界区域，则分析中将仅包含至少一个点的位置。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Bounding Polygons")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _boundingPolygonLayer { get; set; } = null;


        /// <summary>
        /// <para>Aggregation Polygons</para>
        /// <para>When the input layer contains points and no analysis field is specified, you can provide polygon features into which the points will be aggregated and analyzed, such as administrative units. The number of points that fall within each polygon is counted and the point count in each polygon is analyzed.</para>
        /// <para>如果输入图层包含点且未指定分析字段，则可以提供将点聚合和分析到其中的面要素，例如管理单位。计算每个多边形内的点数，并分析每个多边形中的点数。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Aggregation Polygons")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public object _aggregatePolygonLayer { get; set; } = null;


        /// <summary>
        /// <para>Output Layer</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Output Layer")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _outputLayer { get; set; }


        public FindHotSpots SetEnv(object extent = null)
        {
            base.SetEnv(extent: extent);
            return this;
        }

    }

}